/*
 * @package j_simple_tip
 * @version 1.3
 * Copyright (c) 2009 Sean Sandy
 * Dual licensed under the MIT and GPL licenses.
 *
 * @date: 2009-11-20
 * @revision: 4
 */
jQuery.fn.simple_tip = function(){
	var $this = jQuery(this);
	var xOffset = 10 ,yOffset = 20;
	$this.live('mouseover',function(e){
		if(this.title){
			this.t = this.title;
			this.title = '';
			//only create the tooltip one time
			if(!jQuery('#simpletip').length){
				jQuery('body').append('<div id="simpletip">'+ this.t +'</div>');
				jQuery('#simpletip')
				.css('top',(e.pageY - xOffset) + 'px')
				.css('left',(e.pageX + yOffset) + 'px')
				.css('position', 'absolute')
				.css('boder', '1px solid #333')
				.css('background', '#f7f5d1')
				.css('padding', '2px 5px')
				.css('color', '#333')
				.css('display', 'none')
				.fadeIn('fast');
			} else {
				jQuery('#simpletip')
				.html(this.t)
				.css('top',(e.pageY - xOffset) + 'px')
				.css('left',(e.pageX + yOffset) + 'px')
				.fadeIn('fast');
			}
		}
	});
	$this.live('mouseout',function(){
		if(this.t){
			this.title = this.t;
			this.t = '';
			jQuery('#simpletip').hide();
		}
	});
	$this.mousemove(function(e){
		jQuery('#simpletip')
		.css('top',(e.pageY - xOffset) + 'px')
		.css('left',(e.pageX + yOffset) + 'px');
	});
	return this;
}